#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <cstring>

#include <mysql/mysql.h>

using std::string;using std::cout;using std::endl;

int main(int argc, char **argv)
{
	string str("test");
	char buffer[10];
    MYSQL m_mysql;
	mysql_init(&m_mysql);
	mysql_real_connect(&m_mysql, "127.0.0.1", "root", NULL, "test", 3306, NULL, 0);
	for (int i = 0; i < 700000; ++i)
	{
		sprintf(buffer, "%d", i);
		string sqltext;
		sqltext += "insert into UserInfo values('";
		sqltext += (str+buffer);
		sqltext += "','xyz')";
		mysql_query(&m_mysql, sqltext.c_str());
	}
	return 0;   // To avoid Apache errors.
}
